name_list = ['张三', '李四', '王五', '赵六']
print(name_list)
# del name_list   # 此列表已经被删除了
# print(name_list)  # NameError: name 'name_list' is not defined

# 清空元素
# name_list.clear()
# print(name_list)  # [] 空列表

# del name_list[4]    #index out of range  索引越界
# print(name_list)


"""pop"""
# 默认删除 最后一个
# name_list.pop()
# 指定索引删除
# name_list.pop(2)
# print(name_list)

"""remove"""
# name_list.remove('罗翔')   # x not in list
# print(name_list)





